//
//  ImaginationQuietViewController.m
//  AndCampus
//
//  Created by 史宵宵 on 2018/3/9.
//  Copyright © 2018年 史宵宵. All rights reserved.
//

#import "ImaginationQuietViewController.h"
#import "DreamPictureViewController.h"
#import "MyWorksListViewController.h"

@interface ImaginationQuietViewController ()

@end

@implementation ImaginationQuietViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"畅想篇";
    self.navigationItem.rightBarButtonItem = [UIBarButtonItem rightBarButtonItemWithTitle:@"我的作品" target:self selector:@selector(myWorksList)];
    
    UILabel *titleLabel = [[UILabel alloc]init];
    titleLabel.frame = CGRectMake((kScreenW - 60)/2, 20, 60, 60);
    titleLabel.text = @"静";
    titleLabel.font = [UIFont systemFontOfSize:25];
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.backgroundColor = KBACKNAVIGATIONCOLOR;
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.clipsToBounds = YES;
    titleLabel.layer.cornerRadius = 30;
    [self.view addSubview:titleLabel];
    
    UILabel *contentLabel = [[UILabel alloc]init];
    contentLabel.text = @"慢慢调整自己的心境，深深呼吸，将注意力集中在自己的呼吸上，在呼吸中让自己沉静下来。如果喜欢，可以采用静坐或听轻音乐的方式，让浮躁的意识平静下来。此刻，你的心如明镜，一切静待呈现";
    contentLabel.font = [UIFont systemFontOfSize:16];
    contentLabel.frame = CGRectMake(20, 100, kScreenW - 40, [Global getSizeOfString:contentLabel.text maxWidth:kScreenW - 40 maxHeight:MAXFLOAT withFontSize:16.6].height);
    contentLabel.numberOfLines = 0;
    contentLabel.textColor = KTEXTMAINCOLOR;
    [self.view addSubview:contentLabel];
    
    UILabel *textLabel = [[UILabel alloc]init];
    textLabel.frame = CGRectMake(0, CGRectGetMaxY(contentLabel.frame) + 10, kScreenW, 20);
    textLabel.text = @"畅想：画出你生命的logo";
    textLabel.font = [UIFont systemFontOfSize:18];
    textLabel.textAlignment = NSTextAlignmentCenter;
    textLabel.textColor = KBACKNAVIGATIONCOLOR;
    [self.view addSubview:textLabel];
    
    UIImageView *imageView = [[UIImageView alloc]init];
    imageView.frame = CGRectMake( kScreenW/4, CGRectGetMaxY(textLabel.frame)+ 20, kScreenW/2, kScreenW/2);
    imageView.image = [UIImage imageNamed:@"circular"];
    [self.view addSubview:imageView];
    
    CompleteButton *completeButton = [[CompleteButton alloc]initWithFrame:CGRectMake((kScreenW - 200)/2, kScreenH - 64 - 20 - 50, 200, 50) bgColor:KBACKNAVIGATIONCOLOR tColor:[UIColor whiteColor] text:@"下一步"];
    completeButton.layer.cornerRadius = 25;
    [completeButton addTarget:self action:@selector(dreamPicture) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:completeButton];
}
#pragma mark - 畅想画
- (void)dreamPicture{
    DreamPictureViewController *dreamPictureVC = [[DreamPictureViewController alloc]init];
    dreamPictureVC.pictureId = self.pictureListId;
    [self.navigationController pushViewController:dreamPictureVC animated:YES];
}
#pragma mark - 我的作品
- (void)myWorksList{
    MyWorksListViewController *myWorksListVC = [[MyWorksListViewController alloc]init];
    myWorksListVC.did = self.pictureListId;
    [self.navigationController pushViewController:myWorksListVC animated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
